<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>供应商平台</title>
</head>
<body class="tob-wrap">
	<div th:replace="common/top"></div>
	<article class="container container-c41-confirm_order clearfix">
		<div th:replace="common/left::c_side"></div>
		<section class="content">
			<div class="m-crumb">
				<p>
					<a href="#">订单管理 > </a> <span>发货单确认</span>
				</p>
			</div>
			<div class="m-order-info">
				<table width="100%" summay="" cellpadding="0" cellspacing="0">
				<input type="Hidden" th:value="${purchaseOrder.id}" id="purchaseId"/>
					<tr>
						<td>
							<p>订单编号：<span th:text="${purchaseOrder.purchaseOrderNo}">1234567890</span></p>
							<p>描述：<span th:text="${purchaseOrder.purchaseOrderDesc}">这是描述这是描述这是描述这是描述这是描述</span></p>
							<p>总金额：<span th:text="${purchaseOrder.currency eq 0}? '￥':'$'"/><span th:text="${#numbers.formatInteger(purchaseOrder.price,1)}"/></p>
						</td>
						<td>
							<p>时 间：<span th:if="${purchaseOrder.startTime ne null and purchaseOrder.expiredTime ne null}" th:text="${#dates.format(purchaseOrder.startTime, 'yyyy-MM-dd')}+ ' 至 ' +${#dates.format(purchaseOrder.expiredTime, 'yyyy-MM-dd')}">2015-12-12至2016-01-12</span></p>
							<p>供应商：<span th:text="${purchaseOrder.tCompany.companyName}">百度在线网络技术有限公司</span></p>
							<p>送货地址：<span th:text="${purchaseOrder.deliverAddress}">北京市海淀区上地东路1号盈创动力园区鹏寰国际大厦</span></p>
						</td>
						<td class="w150 txR"></td>
					</tr>
				</table>
			</div>
			
			<div class="m-table-sell" th:each="purchaseOrderExecutions : ${purchaseOrder.tPurchaseOrderExecutions}">
				<div class="m-table-cont">
					<table width="100%" summay="" cellpadding="0" cellspacing="0">
						<thead>
							<tr>
								<th><input type="checkbox" name="purchaseOrderExecutionId" th:value="${purchaseOrderExecutions.id}"/> 序号</th>
								<th>商品</th>
								<th>剩余数量</th>
								<th>本次发货数量</th>
								<th>单位</th>
								<th>发货时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<form id="formPersonal">
						<tbody>
							<tr th:each="purchaseOrderExecutionItems,index : ${purchaseOrderExecutions.tPurchaseOrderExecutionItems}">
							<input type="hidden" th:value="${purchaseOrderExecutionItems.id}" name="id"/>
							<!-- <input type="hidden" th:value="${purchaseOrderExecutions.id}" name="orderExecutionId"/>-->
								<td>
									<span th:if="${#strings.length(index.count) eq 1}" th:text="${#strings.prepend(index.count,'00')}"/>
                    				<span th:if="${#strings.length(index.count) eq 2}" th:text="${#strings.prepend(index.count,'0')}"/>
                    				<span th:if="${#strings.length(index.count) eq 3}" th:text="${index.count}"/>
                    			</td>	
								<td class="w150">
									<p>
										<img width="70" height="40" th:if="${purchaseOrderExecutionItems.tMaterialMasterClient.materialPic ne null}" th:src="${purchaseOrderExecutionItems.tMaterialMasterClient.materialPic}" alt=""/>
									</p>
									<p><span th:text="${purchaseOrderExecutionItems.tMaterialMasterClient.materialName}">每行最多十二个字多了折行</span></p>
								</td>
								<td><span th:text="${#numbers.formatInteger(purchaseOrderExecutionItems.quantityConfirmed,1)}">220150</span></td>
								<td><span th:text="${#numbers.formatInteger(purchaseOrderExecutionItems.quantityDelivered,1)}">220150</span></td>
								<td><span th:if="${purchaseOrderExecutionItems.tMaterialMasterClient.tUnit ne null}" th:text="${purchaseOrderExecutionItems.tMaterialMasterClient.tUnit.unitName}">公斤</span></td>
								<td><span th:text="${#dates.format(purchaseOrderExecutionItems.gmtUpdateTime,'yyyy-MM-dd')}">2015-05-23</span></td>
								<td th:if="${index.Count==1}" class="td-rowspan vaT w80" rowspan="3"><a th:if="purchaseOrderExecutions.doc1 ne null" th:href="purchaseOrderExecutions.doc1" download="saleOrderPic.jpg">下载发货单</a></td>
							</tr>
						</tbody>
						</form>
					</table>
				</div>
				
			</div>
			
			<!--<div class="btn-bar txC">
				<a class="btn btn-cyan btn-large" th:href="ja">确定并返回</a>
			</div>-->
			<div class="btn-bar txC">
				<!--<button class="btn btn-cyan btn-large"  onclick="'javascript:submitConfirmOrder('+${purchaseOrder.id}+')'">确定创建并返回</button>-->
				<button class="btn btn-cyan btn-large"  onclick="javascript:submitConfirmOrder();">确定并返回</button>
			</div>
			<br/> <br/>
		</section>
	</article>
</body>
<script data-main="../js/page/b1_supplier" src="../lib/requirejs/require.js"></script>
	<script type="text/javascript" src="../lib/jquery/dist/jquery.js"></script>
	<script type="text/javascript" src="../js/page/b2_order.js"></script>
</html>